package com.esri.core.geometry;

import com.esri.core.geometry.Unit;

/* loaded from: classes.dex */
public class AreaUnit extends Unit {
    private static final long serialVersionUID = 1;

    /* loaded from: classes.dex */
    public interface Code {
        public static final int ACRE = 109402;
        public static final int ACRE_US = 109403;
        public static final int HECTARE = 109401;
        public static final int SQUARE_CENTIMETER = 109451;
        public static final int SQUARE_CHAIN = 109444;
        public static final int SQUARE_CHAIN_BENOIT_A = 109424;
        public static final int SQUARE_CHAIN_BENOIT_B = 109428;
        public static final int SQUARE_CHAIN_CLARKE = 109416;
        public static final int SQUARE_CHAIN_SEARS = 109420;
        public static final int SQUARE_CHAIN_SEARS_1922_TRUNC = 109448;
        public static final int SQUARE_CHAIN_US = 109411;
        public static final int SQUARE_DECIMETER = 109450;
        public static final int SQUARE_FATHOM = 109408;
        public static final int SQUARE_FOOT = 109405;
        public static final int SQUARE_FOOT_1865 = 109430;
        public static final int SQUARE_FOOT_BENOIT_A = 109423;
        public static final int SQUARE_FOOT_BENOIT_B = 109427;
        public static final int SQUARE_FOOT_BRITISH_1936 = 109441;
        public static final int SQUARE_FOOT_CLARKE = 109407;
        public static final int SQUARE_FOOT_GOLD_COAST = 109440;
        public static final int SQUARE_FOOT_INDIAN = 109431;
        public static final int SQUARE_FOOT_INDIAN_1937 = 109432;
        public static final int SQUARE_FOOT_INDIAN_1962 = 109433;
        public static final int SQUARE_FOOT_INDIAN_1975 = 109434;
        public static final int SQUARE_FOOT_SEARS = 109419;
        public static final int SQUARE_FOOT_SEARS_1922_TRUNC = 109447;
        public static final int SQUARE_FOOT_US = 109406;
        public static final int SQUARE_INCH = 109453;
        public static final int SQUARE_INCH_US = 109454;
        public static final int SQUARE_KILOMETER = 109414;
        public static final int SQUARE_KM150 = 109461;
        public static final int SQUARE_KM50 = 109460;
        public static final int SQUARE_LINK = 109445;
        public static final int SQUARE_LINK_BENOIT_A = 109425;
        public static final int SQUARE_LINK_BENOIT_B = 109429;
        public static final int SQUARE_LINK_CLARKE = 109417;
        public static final int SQUARE_LINK_SEARS = 109421;
        public static final int SQUARE_LINK_SEARS_1922_TRUNC = 109449;
        public static final int SQUARE_LINK_US = 109412;
        public static final int SQUARE_METER = 109404;
        public static final int SQUARE_METER_GERMAN = 109410;
        public static final int SQUARE_MILE_STATUTE = 109439;
        public static final int SQUARE_MILE_US = 109413;
        public static final int SQUARE_MILLIMETER = 109452;
        public static final int SQUARE_NAUTICAL_MILE = 109409;
        public static final int SQUARE_NAUTICAL_MILE_UK = 109458;
        public static final int SQUARE_NAUTICAL_MILE_US = 109457;
        public static final int SQUARE_ROD = 109455;
        public static final int SQUARE_ROD_US = 109456;
        public static final int SQUARE_SMOOT = 109459;
        public static final int SQUARE_YARD = 109442;
        public static final int SQUARE_YARD_BENOIT_A = 109422;
        public static final int SQUARE_YARD_BENOIT_B = 109426;
        public static final int SQUARE_YARD_CLARKE = 109415;
        public static final int SQUARE_YARD_INDIAN = 109435;
        public static final int SQUARE_YARD_INDIAN_1937 = 109436;
        public static final int SQUARE_YARD_INDIAN_1962 = 109437;
        public static final int SQUARE_YARD_INDIAN_1975 = 109438;
        public static final int SQUARE_YARD_SEARS = 109418;
        public static final int SQUARE_YARD_SEARS_1922_TRUNC = 109446;
        public static final int SQUARE_YARD_US = 109443;
    }

    static native boolean nativeEquals(int i, int i2);

    static native String nativeGetAbbreviation(int i);

    static native String nativeGetDisplayName(int i);

    static native int nativeGetID(int i);

    static native String nativeGetName(int i);

    static native String nativeGetPluralDisplayName(int i);

    public AreaUnit(int i) {
        this.mWKID = i;
    }

    @Override // com.esri.core.geometry.Unit
    public String getName() {
        if (this.mName == null) {
            this.mName = nativeGetName(this.mWKID);
        }
        return this.mName;
    }

    @Override // com.esri.core.geometry.Unit
    public String getDisplayName() {
        if (this.mDisplayName == null) {
            this.mDisplayName = nativeGetDisplayName(this.mWKID);
        }
        return this.mDisplayName;
    }

    @Override // com.esri.core.geometry.Unit
    public String getPluralDisplayName() {
        if (this.mPluralDisplayName == null) {
            this.mPluralDisplayName = nativeGetPluralDisplayName(this.mWKID);
        }
        return this.mPluralDisplayName;
    }

    @Override // com.esri.core.geometry.Unit
    public String getAbbreviation() {
        if (this.mAbbreviation == null) {
            this.mAbbreviation = nativeGetAbbreviation(this.mWKID);
        }
        return this.mAbbreviation;
    }

    @Override // com.esri.core.geometry.Unit
    public int getID() {
        if (this.mID == -1) {
            this.mID = nativeGetID(this.mWKID);
        }
        return this.mID;
    }

    @Override // com.esri.core.geometry.Unit
    public double getConversionFactor(Unit unit) {
        if (unit.getUnitType() != Unit.UnitType.AREA) {
            throw new GeometryException("invalid call");
        }
        return getUnitToBaseFactor() / unit.getUnitToBaseFactor();
    }

    @Override // com.esri.core.geometry.Unit
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof AreaUnit) {
            return nativeEquals(this.mWKID, ((AreaUnit) obj).mWKID);
        }
        return false;
    }

    @Override // com.esri.core.geometry.Unit
    public Unit.UnitType getUnitType() {
        return Unit.UnitType.AREA;
    }

    public double convertFromSquareMeters(double d) {
        return d / getUnitToBaseFactor();
    }

    public double convertToSquareMeters(double d) {
        return d * getUnitToBaseFactor();
    }
}
